<?php
/**
 * Created by PhpStorm.
 * User: Monkey
 * Date: 2021/10/13
 * Time: 11:27
 * Desc: 登陆
 */

namespace app\backend\validate;

use think\Validate;

class WebsiteConfigValidate extends Validate
{
    protected $rule = [
        'withdraw_fee' => 'float',
        'withdraw_min_money' => 'float',
        'withdraw_max_money' => 'float|gt:withdraw_min_money',
        'recharge_min_money' => 'float',
        'recharge_max_money' => 'float|gt:recharge_min_money',
        'platform_fee' => 'float',
        'withdraw_num' => 'integer',
        'order_min_money' => 'float'
    ];

    protected $message = [
        'withdraw_fee.float' => '提现手续费格式错误',
        'withdraw_min_money.float' => '最小提现金额格式错误',
        'withdraw_max_money.float' => '最小提现金额格式错误',
        'withdraw_max_money.gt' => '最大提现金额不能小于最小提现金额',
        'recharge_min_money.float' => '最小充值金额格式错误',
        'recharge_max_money.float' => '最大充值金额格式错误',
        'recharge_max_money.gt' => '最大充值金额不能小于最小充值金额',
        'platform_fee.float' => '平台手续费格式错误',
        'withdraw_num.integer' => '提现次数格式错误',
        'order_min_money.float' => '单笔最低下单金额'
    ];

    protected $scene = [
        'edit' => ['withdraw_fee', 'withdraw_num', 'notice', 'order_min_money', 'withdraw_min_money', 'withdraw_max_money', 'recharge_min_money', 'recharge_max_money', 'platform_fee']
    ];
}
